package com.dudu.exception;

/**
 * Created by dudu on 16/8/5.
 */
public enum ErrorCode {

    UNKNOW(1, "未知错误"),

    SYSTEM_ERROR(500, "业务处理异常"),
    PARAMS_ERROR(501, "参数错误"),
    SEND_SMS_ERROR(600, "发送短信验证码出现错误"),
    PERMISSION_DENIED_ERROR(503, "no permission to access!."),
    NO_AUTH_ERROR(999999, "您的权限不够,请联系管理员开通权限."),

    USER_LOGIN_ERROR(100001, "用户名或者密码错误."),
    SMS_CODE_ERROR(100005, "短信验证码不正确."),
    USER_EXIST_ERROR(100010, "用户已经存在.");

    private int code;

    private String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String msg) {
        this.message = msg;
    }

}
